<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Carson_Ho</title>
  <script>

   function callAndroid(){
      android.hello("js调用Android","参数1",100);
   }
   function callAndroid2(){
       var car = {type:"porsche", model:"911", color:"white"};
       var strJson=JSON.stringify(car);
       android.checkIn(strJson);
   }
   function callAndroid3(){
       /*约定的url协议为：js://webview?arg1=111&arg2=222*/
<!--       document.location = "js://webview?arg1=111&arg2=222";-->
      document.location="http://www.jd.com";
   }
   function callAndroid4(){
      document.location="android://callandroid?age=123&name=zhoulizhi";
   }
    function callAndroid5(){
      alert("age=123&name=zhoulizhi");
   }
  </script>

</head>
<body>
<button type="button" style="width:80px;height:40px" id="button1" onclick="callAndroid()">
  callAndroid
</button>
<button type="button" style="width:80px;height:40px" id="button2" onclick="callAndroid2()">
  callAndroid2
</button>
<button type="button" style="width:80px;height:40px" id="button3" onclick="callAndroid3()">百度主页
</button>
<button type="button" style="width:80px;height:40px" id="button4"
        onclick="callAndroid4()">url scheme
</button>
<button type="button" style="width:80px;height:40px" id="button5"
        onclick="callAndroid5()">onJsAlert
</button>
</body>
</html>